$(document).ready(function(){
	
	var sex = $("#sexEN").text();
	if(sex=="1"){
		$("#sexID").text("男");
	}else{
		$("#sexID").text("女");
	}
	
	//显示专家头像
	var img = $("#DIS_EXPIMGID").text();
	//$("#expImgID").attr("src","file:///E|/test测试/2.gif");
	//alert("头像:"+img);
	
	if(img!==null && img.length>0){
		$("#expImgID").attr("src","/ag/hmkuploads/"+img);
	}else{
		$("#expImgID").attr("src","/ag/hmk/images/mypic.jpg");//$("#expImgID").attr("src","hmk/expert/4.jpg");
	}
	
	
	$("#EDIT_EXPERT").click(function(){
		var expertID = $("#expertID").text();
		window.location.href="/ag/hmk/findOneExpert_findOneExpert.action?expertID="+expertID;
		//window.location.replace("hmk/editAidTeam.jsp");
	});
	
	//删除专家
	$("#del_EXP").click(function(){
		var isPass = confirm("确定要删除吗？");
		if(isPass){
			var content = $("#expertID").text();
			var url = 'hmk/delExpert_delExpert.action';
			var params = {
				expertID:content
			}; 
			jQuery.post(url, params, delData, 'json');
		}
		
	});

	//返回
	$("#BACK_EXP").click(function(){
		window.location.replace("/ag/hmk/ExpertMain.jsp");
	});
	
});

function delData(data){
	if(data.ajaxRST=='1'){
		alert("删除成功");
		window.location.replace("/ag/hmk/ExpertMain.jsp");
	 }else{
		alert("删除失败");
	 }
}